package com.dr.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dr.entity.Message;
import com.dr.entity.MessageVO;
import com.dr.mapper.MessageMapper;
import com.dr.service.MessageService;
@Service
@Transactional
public class MessageServiceImpl implements MessageService {
        @Autowired
       private MessageMapper messageMapper;

		@Override
		public List<Message> AllMessage(MessageVO messageVO) {
			// TODO Auto-generated method stub
			return messageMapper.AllMessage(messageVO);
		}

		@Override
		public Integer getCount(MessageVO messageVO) {
			// TODO Auto-generated method stub
			return messageMapper.getCount(messageVO);
		}

		
		public int deleteMessage(int id) {
			// TODO Auto-generated method stub
			return messageMapper.deleteMessage(id);
		}
		
		@Override
		public Integer updateMessage(Message m) {
			// TODO Auto-generated method stub
			return messageMapper.updateMessage(m);
		}

		@Override
		public Integer updateisAnswer(int id, int isAnswer) {
			// TODO Auto-generated method stub
			return messageMapper.updateisAnswer(id, isAnswer);
		}

		

}
